package MVCEX1BT2;
import java.util.InputMismatchException;
import java.util.Scanner;

public class Views {
	public static void main(String[] args) {
		Entity case1=new Entity();
		Scanner sc=new Scanner(System.in);
		int i;
		
			
//		System.out.print("Input a  : ");
//		case1.setA(sc.nextInt());
//		System.out.print("Input b  : ");
//		case1.setB(sc.nextInt());
//		
//		System.out.println("0-Cong-1-Tru-2-Nhan-3-Chia");
//		System.out.print("Input way: ");
//		case1.setWay(sc.nextInt());
//lam truc tiep qua InputMismatchException false ???????? ma phai lam gian tiep qua bien trung gian moi duoc
		int x=0,y=0,z=0;
		
		do{
			i=0;
			System.out.print("Input a  : ");
			String temp1=sc.nextLine();
			System.out.print("Input b  : ");
			String temp2=sc.nextLine();	
			System.out.print("Input way: ");
			String temp3=sc.nextLine();
		try{
			x=Integer.parseInt(temp1);
			y=Integer.parseInt(temp2);
			z=Integer.parseInt(temp3);
			}
		catch(NumberFormatException exc){
			System.out.println("------------Reset-----------");
			i=1;
			}
        if(i==1){continue;}
			
        else {if(z!=0||z!=1||z!=2||z!=3){
			System.out.println("------------Reset------------");
			i=1;}}
			
			}
		while(i==1);
		case1.setA(x);
		case1.setB(y);
		//case1.setWay(z);
		Controllers result=new Controllers();
		System.out.print("Result   : ");
		result.Implement(case1);
		
		
		
	}
	
}
